package com.qsxc.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 推广员分成记录表，支付成功后生成
 * </p>
 *
 * @author
 * @since 2024-09-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SmPromoterDivideRecord对象", description = "推广员分成记录表，支付成功后生成")
public class SmPromoterDivideRecord extends Model<SmPromoterDivideRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    private Long createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("update_by")
    private Long updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value = "用户sm_user.id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "推广员sm_promoter.id")
    @TableField("promoter_id")
    private Long promoterId;

    @ApiModelProperty(value = "下级推广员sm_promoter.id")
    @TableField("sub_promoter_id")
    private Long subPromoterId;

    @ApiModelProperty(value = "sm_user_pay_record.id")
    @TableField("pay_record_id")
    private Long payRecordId;

    @ApiModelProperty(value = "分成金额")
    @TableField("amount_money")
    private Double amountMoney;

    @ApiModelProperty(value = "sm_promoter_cash_record.id（提现申请时填写）")
    @TableField("cash_record_id")
    private Long cashRecordId;

    @ApiModelProperty(value = "1:直接提成;2:下级提成")
    @TableField("source_type")
    private String sourceType;

    @TableField("status")
    private String status;


    public static final String ID = "id";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

    public static final String USER_ID = "user_id";

    public static final String PROMOTER_ID = "promoter_id";

    public static final String SUB_PROMOTER_ID = "subPromoterId";

    public static final String PAY_RECORD_ID = "pay_record_id";

    public static final String AMOUNT_MONEY = "amount_money";

    public static final String CASH_RECORD_ID = "cash_record_id";

    public static final String SOURCE_TYPE = "source_type";

    public static final String STATUS = "status";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
